FROM registry.cn-hangzhou.aliyuncs.com/zhengyan/jdk8-arm64:1.2

#ENV JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"

COPY ./starter/target/starter-4.0/ /opt/jpress/
COPY ./docker/files/jpress.sh /opt/jpress/jpress.sh
COPY ./docker/files/jboot.properties /opt/jpress/config/jboot.properties
COPY ./docker/files/install.lock /opt/jpress/config/install.lock


RUN chmod +x /opt/jpress/jpress.sh &&  \
    rm -rf /opt/jpress/jpress.bat && \
    rm -rf /opt/jpress/config/undertow.txt

EXPOSE 8080

CMD ["/opt/jpress/jpress.sh", "start"]